{% extends "base_generic.html" %}
{% block script %}
<script type="text/javascript">
function generateUrl(name) {
  var sanitizedName = string_to_slug(name);
  $("#url").val(sanitizedName);
}

</script>
{% endblock %}
{% block content %}
	<h1>Film</h1>
<form name="edit-admin" id="edit-admin" method="post" action="{{path}}">
<div class="field">
<label for="name">Name:</label>
<input type="text" name="name" id="name" value="{{user.name}}" onblur="generateUrl($('#name').val())" />
</div>
<div class="field">
<label for="url">URLs:</label>
<input type="text" name="url" id="url" value="{{user.url}}" />
</div>
<div class="field">
<label for="url">Email:</label>
<input type="text" name="email" id="email" value="{{user.user.email}}" />
</div>
<div class="field">
<label for="url">Role:</label>
<input type="text" name="role" id="role" value="{{user.role}}" />
</div>
</div><br class="clear" />
<input type="submit" name="save" class="mainbutton" id="publish" value="Save" />
<br class="clear" />
</form>
{% endblock %}
